﻿@ModelType NutritionalData

<table class="nutrition-data-table">
    <thead>
        <tr>
            <th colspan="3">ערכים תזונתיים</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="3">@Model.ServingDescription</td>
        </tr>
        <tr class="nutrition-data-row">
            <th></th>
            <th>למנה</th>
            <th>% מצריכה יומית</th>
        </tr>
        @For Each field In NutritionalData.Fields
            @<tr class="@IIf(field.Ident, "nutrition-data-row-sub", "nutrition-data-row") @Model.FieldRowRatingClass(field)">
    <th class="nutrition-data-row-header">@field.Name</th>
    @If Model.Values.ContainsKey(field.Name) Then
        @<td>@Strings.Format(Model.ValuePerServing(field), 0) @field.Unit</td>
        @<td>
            @If field.DailyAmount > 0 Then
                @Strings.FormatPercent(Model.DailyPercentage(field), 0)
                End If
        </td>
            Else
        @<td></td>
        @<td></td>
            End If
</tr>
        Next
    </tbody>

</table>
